Integrand size = 31, antiderivative size = 95 \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=-\frac {12 c^4 x}{a}-\frac {12 i c^4 \log (\cos (e+f x))}{a f}+\frac {5 c^4 \tan (e+f x)}{a f}-\frac {i c^4 \tan ^2(e+f x)}{2 a f}+\frac {8 i c^4}{f (a+i a \tan (e+f x))} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45} \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=-\frac {i c^4 \tan ^2(e+f x)}{2 a f}+\frac {5 c^4 \tan (e+f x)}{a f}+\frac {8 i c^4}{f (a+i a \tan (e+f x))}-\frac {12 i c^4 \log (\cos (e+f x))}{a f}-\frac {12 c^4 x}{a} \]
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps \begin{align*} \text {integral}& = \left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(a+i a \tan (e+f x))^5} \, dx \\ & = -\frac {\left (i c^4\right ) \text {Subst}\left (\int \frac {(a-x)^3}{(a+x)^2} \, dx,x,i a \tan (e+f x)\right )}{a^3 f} \\ & = -\frac {\left (i c^4\right ) \text {Subst}\left (\int \left (5 a-x+\frac {8 a^3}{(a+x)^2}-\frac {12 a^2}{a+x}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^3 f} \\ & = -\frac {12 c^4 x}{a}-\frac {12 i c^4 \log (\cos (e+f x))}{a f}+\frac {5 c^4 \tan (e+f x)}{a f}-\frac {i c^4 \tan ^2(e+f x)}{2 a f}+\frac {8 i c^4}{f (a+i a \tan (e+f x))} \\ \end{align*}
Time = 0.94 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.68 \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=-\frac {i c^4 \left (-24 \log (i-\tan (e+f x))+10 i \tan (e+f x)+\tan ^2(e+f x)+\frac {16 i}{-i+\tan (e+f x)}\right )}{2 a f} \]
[In]
[Out]
Time = 0.24 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.07
method | result | size |
derivativedivides | \(\frac {5 c^{4} \tan \left (f x +e \right )}{a f}-\frac {i c^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{2 a f}-\frac {12 c^{4} \arctan \left (\tan \left (f x +e \right )\right )}{f a}+\frac {6 i c^{4} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{f a}+\frac {8 c^{4}}{f a \left (\tan \left (f x +e \right )-i\right )}\) | \(102\) |
default | \(\frac {5 c^{4} \tan \left (f x +e \right )}{a f}-\frac {i c^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{2 a f}-\frac {12 c^{4} \arctan \left (\tan \left (f x +e \right )\right )}{f a}+\frac {6 i c^{4} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{f a}+\frac {8 c^{4}}{f a \left (\tan \left (f x +e \right )-i\right )}\) | \(102\) |
risch | \(\frac {4 i c^{4} {\mathrm e}^{-2 i \left (f x +e \right )}}{a f}-\frac {24 c^{4} x}{a}-\frac {24 c^{4} e}{a f}+\frac {2 i c^{4} \left (4 \,{\mathrm e}^{2 i \left (f x +e \right )}+5\right )}{f a \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}-\frac {12 i c^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{a f}\) | \(106\) |
norman | \(\frac {\frac {17 i c^{4}}{2 a f}-\frac {12 c^{4} x}{a}+\frac {5 c^{4} \left (\tan ^{3}\left (f x +e \right )\right )}{a f}-\frac {12 c^{4} x \left (\tan ^{2}\left (f x +e \right )\right )}{a}+\frac {13 c^{4} \tan \left (f x +e \right )}{a f}-\frac {i c^{4} \left (\tan ^{4}\left (f x +e \right )\right )}{2 a f}}{1+\tan ^{2}\left (f x +e \right )}+\frac {6 i c^{4} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{f a}\) | \(133\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.78 \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=-\frac {2 \, {\left (12 \, c^{4} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 2 i \, c^{4} + 6 \, {\left (4 \, c^{4} f x - i \, c^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, {\left (4 \, c^{4} f x - 3 i \, c^{4}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 6 \, {\left (i \, c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + 2 i \, c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + i \, c^{4} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )\right )}}{a f e^{\left (6 i \, f x + 6 i \, e\right )} + 2 \, a f e^{\left (4 i \, f x + 4 i \, e\right )} + a f e^{\left (2 i \, f x + 2 i \, e\right )}} \]
[In]
[Out]
Time = 0.24 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.84 \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=\frac {8 i c^{4} e^{2 i e} e^{2 i f x} + 10 i c^{4}}{a f e^{4 i e} e^{4 i f x} + 2 a f e^{2 i e} e^{2 i f x} + a f} + \begin {cases} \frac {4 i c^{4} e^{- 2 i e} e^{- 2 i f x}}{a f} & \text {for}\: a f e^{2 i e} \neq 0 \\x \left (\frac {24 c^{4}}{a} + \frac {\left (- 24 c^{4} e^{2 i e} + 8 c^{4}\right ) e^{- 2 i e}}{a}\right ) & \text {otherwise} \end {cases} - \frac {24 c^{4} x}{a} - \frac {12 i c^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} \]
[In]
[Out]
Exception generated. \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (85) = 170\).
Time = 0.53 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.99 \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=\frac {2 \, {\left (-\frac {6 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a} + \frac {12 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a} - \frac {6 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a} - \frac {13 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 9 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 24 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 9 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 13 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - i \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{2} a}\right )}}{f} \]
[In]
[Out]
Time = 5.84 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.89 \[ \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx=\frac {5\,c^4\,\mathrm {tan}\left (e+f\,x\right )}{a\,f}+\frac {c^4\,8{}\mathrm {i}}{a\,f\,\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}-\frac {c^4\,{\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}}{2\,a\,f}+\frac {c^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,12{}\mathrm {i}}{a\,f} \]
[In]
[Out]